package com.zz.server.handle.web;

import com.zz.common.annotation.Path;
import com.zz.common.entity.WebRequest;
import com.zz.common.entity.WebResponse;
import com.zz.common.utils.ObjectUtil;
import com.zz.common.web.WebHandler;
import lombok.extern.slf4j.Slf4j;

/**
 * 与客户端建立 channel 通道池
 *
 * @author zz
 */
@Slf4j
@Path(value = "/client_config/start", protocol = "default")
public class StartWebHandler implements WebHandler {

    @Override
    public WebResponse doGet(WebRequest request) throws Exception {
        return doPost(request);
    }

    @Override
    public WebResponse doPost(WebRequest request) throws Exception{
        if (ObjectUtil.isEmptys(request.getContext(),
                request.getProxyType(), request.getRequestHeader().getClientId())) {
            return WebResponse.fail("web请求参数错误");
        }


        return WebResponse.success();
    }


}
